
package org.jetnuke.dao.hsqldb;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.List;

import net.jforum.JForumExecutionContext;
import net.jforum.util.preferences.SystemGlobals;

import org.jetnuke.dao.generic.GenericBlogPostDAO;

public class HsqldbBlogPostDAO extends GenericBlogPostDAO {

	public List retrievePublishByUser(int id, int maxnumberpost) throws Exception {
		PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("BlogPostModel.selectPublishByUserLimit"));
		p.setInt(1,maxnumberpost);
		p.setInt(2,id);
		ResultSet rs = p.executeQuery();
		List list = this.processSelectAll(rs);
		rs.close();
		p.close();
		
		return list;
	}

}
